create or replace view vac_app_nav_bar_4_1 as
with nb as
(
select
    workspace,
    workspace_display_name,
    application_id,
    application_name,
    to_char(display_sequence) display_sequence,
    begins_on_new_line,
    to_char(cell_column_span) cell_column_span,
    icon_image,
    icon_subtext,
    icon_target,
    icon_image_alt,
    to_char(icon_height) icon_height,
    to_char(icon_width) icon_width,
    condition_type,
    condition_type_code,
    condition_expression1,
    condition_expression2,
    onclick_javascript,
    build_option,
    authorization_scheme,
    authorization_scheme_id,
    is_subscribed,
    subscribed_from,
    last_updated_by,
    last_updated_on,
    component_comment,
    nav_bar_id,
    is_feedback_link,
    referenced_nav_bar_id,
    component_signature
 from APEX_APPLICATION_NAV_BAR
)
select
    workspace,
    workspace_display_name,
    application_id,
    application_name,
    display_sequence,
    authorization_scheme_id,
    nav_bar_id,
    last_updated_by,
    last_updated_on,
    referenced_nav_bar_id,
    u_name,
    u_value,
    'APEX_APPLICATION_NAV_BAR' src_view_name
from nb
UNPIVOT INCLUDE NULLS(u_value FOR u_name IN
 (
    begins_on_new_line,
    cell_column_span,
    icon_image,
    icon_subtext,
    icon_target,
    icon_image_alt,
    icon_height,
    icon_width,
    condition_type,
    condition_type_code,
    condition_expression1,
    condition_expression2,
    onclick_javascript,
    build_option,
    authorization_scheme,
    is_subscribed,
    subscribed_from,
    component_comment,
    is_feedback_link
   --    component_signature
 )
);

